home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_46 / sbmidi.c < prev    next >
C/C++ Source or Header  |  1995-01-01  |  298b  |  19 lines

  1. #include <stdio.h>
  2. #include <dos.h>
  3. #include "sb.h"
  4.  
  5. int Sb_Read_MIDI(void)
  6. {
  7.     writedac(MIDI_READ_POLL);
  8.  
  9.     while(!(inportb(DSP_DATA_AVAIL) & 0x80))
  10.      ;
  11.     return inportb(DSP_READ_DATA);
  12. }
  13.  
  14. void Sb_Write_MIDI(int data)
  15. {
  16.     writedac(MIDI_WRITE_POLL);
  17.     writedac(data);
  18. }
  19.